import mysql from 'mysql';
import config from './../dbConfig';

const pool=mysql.createPool(config);

function query(sql,param,callback){
    pool.getConnection((err, conn) => {
        if (!err) {
            conn.query(sql, param, callback);
            conn.release();
        } else {
            callback(err, null, null);
        }
    })
}
module.exports={
    query:query
}